import request from '@/utils/request'

export default {
  getTeachers() {
    return request({
      url: '/admin/edu/teacher/list',
      method: 'get'
    })
  },
  listPage(page, size, searchobj) {
    return request({
      url: '/admin/edu/teacher/list/' + page + '/' + size,
      method: 'get',
      params: searchobj
    })
  },
  save(obj) {
    return request({
      url: '/admin/edu/teacher/save',
      method: 'post',
      data: obj
    })
  },
  removeById(id) {
    return request({
      url: '/admin/edu/teacher/remove/' + id,
      method: 'delete'
    })
  },
  batchRemove(idList) {
    return request({
      url: '/admin/edu/teacher/batchRemove',
      method: 'delete',
      data: idList
    })
  },
  getById(id) {
    return request({
      url: '/admin/edu/teacher/getById/' + id,
      method: 'get'
    })
  },
  edit(obj) {
    return request({
      url: '/admin/edu/teacher/edit',
      method: 'post',
      data: obj
    })
  },
  listByKey(key) {
    return request({
      url: '/admin/edu/teacher/listByKey',
      method: 'get',
      params: key
    })
  }
}
